With the wide application of computer languages, computer language compiling has become an indispensable key step in the process of using a computer language. A manually written computer language may have initial syntax errors in terms of the computer language syntax due to subjectivity. Therefore, how to efficiently and correctly compiling a manually written computer language has become a problem to be solved by those skilled in the art.
The computer language is analyzed and compiled to be converted from a language easily understood by human to a language easily understood by a computer. The basic compiling process is changing source codes into an authentication Token sequence, then changing the authentication Token sequence into a Parse Tree (PST for short) according to a defined syntax grammar, and further performing semantic analysis to change the PST into an Abstract Syntax Tree (AST for short). The resulting AST is understood by the computer.
However, the problem is that the analyzed and compiled source codes are entered by engineers and often have various errors. For example, when a simple Token contains a character that should not be used, most of the existing compilers may tolerate errors to some extent in the phase of generating the PST and compile the remaining source codes as much as possible so as to find more errors. However, if the PST cannot be converted to the corresponding AST due to the error, the entire AST generation phase will fail as the AST is a tree-like nested structure in which a parent node is dependent on correct generation of all child nodes. The failure in generating the AST leads to unavailability of AST-based functions, such as prompting various type errors during compiling, prompting functions that might be used by the user in an Integrated Development Environment (IDE), etc.
Each syntax unit of the parsed language is processed in a special manner under the conventional techniques to determine whether the unit may be further analyzed. However, this may hardly be fully implemented for a computer language in reality due to the heavy workload. The AST is generated as far as possible according to the method mentioned above, but the implementation in reality is difficult as the workload is too heavy and errors occur easily.
No effective solution has been proposed to solve the problem of low computer language compiling efficiency caused by the lack of a fault-tolerant computer language compiling technology in the conventional techniques.